home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_218 / edlib / strspn.c < prev    next >
Text File  |  1992-05-06  |  460b  |  21 lines

  1. /*
  2.  * edlib v1.1 Copyright 1989 Edwin Hoogerbeets
  3.  * This code is freely redistributable as long as no charge other than
  4.  * reasonable copying fees are levied for it.
  5.  */
  6.  
  7. /* Return the number of characters from "charset" that are at the BEGINNING
  8.  * of string "str".
  9. */
  10.  
  11. int strspn(str, charset)
  12. register char *str, *charset;
  13. {
  14.         register char *temp = str;
  15.  
  16.         while ( index(charset, *temp) )
  17.                 ++temp;
  18.  
  19.         return(temp - str);
  20. }
  21.